
public class Histogram
{
	public static void main(String[] args)
	{
		byte his[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		for(int i = 0; i < 200; i++)
			his[(byte)((Math.random() * 100) / 10)]++;
		for(byte i = 0; i < his.length; i++)
		{
			System.out.printf("%3d - %3d | ", ((10 * i) + 1), ((i + 1) * 10));
			for(byte k = 0; k < his[i]; k++)
				System.out.print('*');
			System.out.println();
		}
	}
}
